<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>部门列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/oa/Public/js/jquery.js"></script>
<script type="text/javascript" src="/oa/Public/js/common.js"></script>
<script type="text/javascript">
function refresh()
{
	document.location = document.location.href.replace('#', '');
}
function deptclick(dept_id){
	parent.main.location="/oa/index.php/User/lists?dept_id="+dept_id;
}

function user_add(){
	parent.main.location='/oa/index.php/User/add';
}
</script>

<style type="text/css">
	body{
		color: #333333;
	    font: 12px "宋体",Verdana,Arial,Helvetica,sans-serif;
		height:100%;
		border: 1px solid #E0E0E0;
	}
	ul{
		list-style: none outside none;
		margin-left:-20px;
	}
	li{
		margin: 7px 0;
	}
	a{
		text-decoration: none;
		color: #393939;;
	}
	.list_name a:hover{
		background-color:#3CC4A9;
	}
</style>
</head>
<body>
<table>
  <tr>
	<td class="Big"><img src="/oa/Public/images/add.gif" align="absmiddle"><input type="button"  value="新建用户" class="button" onClick="user_add();" title="新建用户"></td>
  </tr>
</table>
<div>
	<img src="/oa/Public/images/green_arrow.gif" WIDTH="20" HEIGHT="18"> OA办公自动化应用系统
</div>
<?php if(!empty($data)){ ?>
<div>
  <ul>
  <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(!empty($vo['one'])){ ?>
	  <li><img src="/oa/Public/images/tree2.jpg" /><a href="#" class="list_name" onclick="deptclick(<?php echo ($vo["dept_id"]); ?>);"><?php echo ($vo["dept_name"]); ?></a></li>
	  <ul>
	  	<?php if(is_array($vo["one"])): $i = 0; $__LIST__ = $vo["one"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): $mod = ($i % 2 );++$i;?><li><a href="javascript:;" class="list_name" onclick="deptclick(<?php echo ($vo1["dept_id"]); ?>);"><?php echo ($vo1["dept_name"]); ?></a></li>
	  	  <?php if(!empty($vo1['two'])){ ?>
		  <ul>
		  	<?php if(is_array($vo1["two"])): $i = 0; $__LIST__ = $vo1["two"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo2): $mod = ($i % 2 );++$i;?><li><a href="javascript:;"  class="list_name" onclick="deptclick(<?php echo ($vo2["dept_id"]); ?>);"><?php echo ($vo2["dept_name"]); ?></a></li>
		  	  <?php if(!empty($vo2['three'])){ ?>
		  	  <ul>
		  	    <?php foreach($vo2['three'] as $vo3){ ?>
		  	      <li><a href="javascript:;"  class="list_name" onclick="deptclick(<?php echo ($vo3["dept_id"]); ?>);"><?php echo ($vo3["dept_name"]); ?></a></li>
		  	      <?php if(!empty($vo3['four'])){ ?>
		  	      <ul>
		  	      	<?php foreach($vo3['four'] as $vo4){ ?>
		  	      	  <li><a href="javascript:;"  class="list_name" onclick="deptclick(<?php echo ($vo4["dept_id"]); ?>);"><?php echo ($vo4["dept_name"]); ?></a></li>
		  	      	<?php } ?>
		  	      </ul>
		  	      <?php } ?>
		  	    <?php } ?>
		  	  </ul>
		  	  <?php } endforeach; endif; else: echo "" ;endif; ?>
		  </ul>
		 <?php } endforeach; endif; else: echo "" ;endif; ?>
	  </ul>
	 <?php }else{ ?>
	 <li><img src="/oa/Public/images/tree1.jpg" /><a href="#" class="list_name" onclick="deptclick(<?php echo ($vo["dept_id"]); ?>);"><?php echo ($vo["dept_name"]); ?></a></li>
	 <?php } endforeach; endif; else: echo "" ;endif; ?>
  </ul>
<?php } ?>

</body>
</html>